# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=francis
pkgver=1.0.1
pkgrel=0
pkgdesc="Track your time"
url="https://invent.kde.org/utilities/francis"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="GPL-3.0-or-later AND LGPL-2.0-or-later and BSD-2-Clause AND BSD-3-Clause"
makedepends="
	extra-cmake-modules
	kconfig5-dev
	kcoreaddons5-dev
	kdbusaddons5-dev
	ki18n5-dev
	kirigami-addons-dev
	kirigami2-dev
	knotifications5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	qt5-qtsvg-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/utilities/francis.git"
source="https://download.kde.org/stable/francis/francis-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
26581c33f95252520e319bfe45b695940c280dd923eecca1c45c816adcbc41b58754678afcab094734fcbde063a8663c539147fc517e76f96d5c0f534cd5f9b2  francis-1.0.1.tar.xz
"
